
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>第 3 章 ElasticSearch 安装 · 大数据 Azkaban 课堂笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content=" 李振超">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-solarizedlight.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-change_girls/girls.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="styles/website.css">
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="di-4-zhang-elasticsearch-jiao-hu-fang-shi.html" />
    
    
    <link rel="prev" href="di-2-zhang-elasticsearch-ji-chu-zhi-shi/22-elasticsearch-te-dian.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.atguigu.com/" target="_blank" class="custom-link">联系我们</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        <li class="header">第 1 部分 ElasticSearch</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    第 1 章 ElasticSearch 简介
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="11-elasticsearch-shi-shi-yao.html">
            
                <a href="11-elasticsearch-shi-shi-yao.html">
            
                    
                    1.1 Elasticsearch 是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="12-elasticsearch-shi-yong-an-li.html">
            
                <a href="12-elasticsearch-shi-yong-an-li.html">
            
                    
                    1.2 ElasticSearch 使用案例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="13-yu-qi-ta-shu-ju-cun-chu-bi-jiao.html">
            
                <a href="13-yu-qi-ta-shu-ju-cun-chu-bi-jiao.html">
            
                    
                    1.3 与其他数据存储比较
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="di-2-zhang-elasticsearch-ji-chu-zhi-shi.html">
            
                <a href="di-2-zhang-elasticsearch-ji-chu-zhi-shi.html">
            
                    
                    第 2 章 ElasticSearch 基础知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="di-2-zhang-elasticsearch-ji-chu-zhi-shi/21-elasticsearch-shu-ju-cun-chu-fang-shi.html">
            
                <a href="di-2-zhang-elasticsearch-ji-chu-zhi-shi/21-elasticsearch-shu-ju-cun-chu-fang-shi.html">
            
                    
                    2.1 ElasticSearch 数据存储方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="di-2-zhang-elasticsearch-ji-chu-zhi-shi/23-dao-pai-suo-yin.html">
            
                <a href="di-2-zhang-elasticsearch-ji-chu-zhi-shi/23-dao-pai-suo-yin.html">
            
                    
                    2.3 倒排索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="di-2-zhang-elasticsearch-ji-chu-zhi-shi/22-elasticsearch-te-dian.html">
            
                <a href="di-2-zhang-elasticsearch-ji-chu-zhi-shi/22-elasticsearch-te-dian.html">
            
                    
                    2.2 ElasticSearch 特点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.3" data-path="di-3-zhang-elasticsearch-an-zhuang.html">
            
                <a href="di-3-zhang-elasticsearch-an-zhuang.html">
            
                    
                    第 3 章 ElasticSearch 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="di-4-zhang-elasticsearch-jiao-hu-fang-shi.html">
            
                <a href="di-4-zhang-elasticsearch-jiao-hu-fang-shi.html">
            
                    
                    第 4 章 Kibana 安装
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="di-4-zhang-elasticsearch-jiao-hu-fang-shi/41-elasticsearch-jiao-hu-fang-shi.html">
            
                <a href="di-4-zhang-elasticsearch-jiao-hu-fang-shi/41-elasticsearch-jiao-hu-fang-shi.html">
            
                    
                    4.1 ElasticSearch 交互方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="di-4-zhang-elasticsearch-jiao-hu-fang-shi/42-an-zhuang-kibana.html">
            
                <a href="di-4-zhang-elasticsearch-jiao-hu-fang-shi/42-an-zhuang-kibana.html">
            
                    
                    4.2 安装 Kibana
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="di-4-zhang-elasticsearch-jiao-hu-fang-shi/43-kibana-gong-neng-jian-jie.html">
            
                <a href="di-4-zhang-elasticsearch-jiao-hu-fang-shi/43-kibana-gong-neng-jian-jie.html">
            
                    
                    4.3 Kibana 功能简介
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="di-5-zhang-zhi-zuo-elastic-he-kibana-de-tong-yi-qi-dong-jiao-ben.html">
            
                <a href="di-5-zhang-zhi-zuo-elastic-he-kibana-de-tong-yi-qi-dong-jiao-ben.html">
            
                    
                    第 5 章 制作 ElasticSearch 和 Kibana 的统一启停脚本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="di-6-zhang-elastic-restfull-api.html">
            
                <a href="di-6-zhang-elastic-restfull-api.html">
            
                    
                    第 6 章 Elastic Restfull Api
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="di-6-zhang-elastic-restfull-api/61-elasticsearch-zhong-bao-cun-de-shu-ju-jie-gou.html">
            
                <a href="di-6-zhang-elastic-restfull-api/61-elasticsearch-zhong-bao-cun-de-shu-ju-jie-gou.html">
            
                    
                    6.1 ElasticSearch 中保存的数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju.html">
            
                    
                    6.2 操作 ElasticSearch 中的数据
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.1" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/621-cha-kan-es-zhong-you-na-xie-suo-yin.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/621-cha-kan-es-zhong-you-na-xie-suo-yin.html">
            
                    
                    6.2.1 查看 ES 中有哪些索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.2" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/622-zeng-jia-suo-yin.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/622-zeng-jia-suo-yin.html">
            
                    
                    6.2.2 增加索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.3" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/623-shan-chu-suo-yin.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/623-shan-chu-suo-yin.html">
            
                    
                    6.2.3 删除索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.4" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/624-xin-zeng-wen-dang.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/624-xin-zeng-wen-dang.html">
            
                    
                    6.2.4 新增文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.5" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/625-sou-suo-type-quan-bu-shu-ju.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/625-sou-suo-type-quan-bu-shu-ju.html">
            
                    
                    6.2.5 搜索 type 全部数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.6" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/622-cha-zhao-zhi-ding-id-de-document-shu-ju.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/622-cha-zhao-zhi-ding-id-de-document-shu-ju.html">
            
                    
                    6.2.6 查找指定 id 的 document 数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.7" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/627-xiu-gai.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/627-xiu-gai.html">
            
                    
                    6.2.7 修改 document
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.8" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/628-shan-chu-yi-ge-document.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/628-shan-chu-yi-ge-document.html">
            
                    
                    6.2.8 删除一个 document
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.9" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/629-an-tiao-jian-cha-8be228-quan-90e829.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/629-an-tiao-jian-cha-8be228-quan-90e829.html">
            
                    
                    6.2.9 按条件查询(全部)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.10" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6210-an-zhao-zi-duan-de-fen-ci-cha-xun.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6210-an-zhao-zi-duan-de-fen-ci-cha-xun.html">
            
                    
                    6.2.10 按照字段的分词查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.11" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6211-an-zhao-fen-ci-zi-shu-xing-cha-xun.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6211-an-zhao-fen-ci-zi-shu-xing-cha-xun.html">
            
                    
                    6.2.11 按照分词子属性查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.12" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6212-an-zhao-duan-yu-cha-xun.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6212-an-zhao-duan-yu-cha-xun.html">
            
                    
                    6.2.12 按照短语查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.13" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6213-mo-hu-cha-xun.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6213-mo-hu-cha-xun.html">
            
                    
                    6.2.13 模糊查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.14" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6214-guo-lv.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6214-guo-lv.html">
            
                    
                    6.2.14 过滤(查询后过滤)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.15" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6115-cha-xun-qian-guo-6ee428-tui-jian-shi-752829.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6115-cha-xun-qian-guo-6ee428-tui-jian-shi-752829.html">
            
                    
                    6.1.15 查询前过滤(推荐使用)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.16" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6116-an-fan-wei-guo-lv.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6116-an-fan-wei-guo-lv.html">
            
                    
                    6.1.16 按范围过滤
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.17" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6117-pai-xu.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6117-pai-xu.html">
            
                    
                    6.1.17 排序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.18" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6118-fen-ye-cha-xun.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6118-fen-ye-cha-xun.html">
            
                    
                    6.1.18 分页查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.19" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6219-zhi-ding-cha-xun-de-zi-duan.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6219-zhi-ding-cha-xun-de-zi-duan.html">
            
                    
                    6.2.19 指定查询的字段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.20" data-path="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6220-ju-he.html">
            
                <a href="di-6-zhang-elastic-restfull-api/62-cao-zuo-elasticsearch-zhong-de-shu-ju/6220-ju-he.html">
            
                    
                    6.2.20 聚合
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="di-7-zhang-zhong-wen-fen-ci.html">
            
                <a href="di-7-zhang-zhong-wen-fen-ci.html">
            
                    
                    第 7 章 中文分词
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="di-7-zhang-zhong-wen-fen-ci/71-fen-ci-qi.html">
            
                <a href="di-7-zhang-zhong-wen-fen-ci/71-fen-ci-qi.html">
            
                    
                    7.1 分词器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="di-7-zhang-zhong-wen-fen-ci/71-an-zhuang-ik-fen-ci-qi.html">
            
                <a href="di-7-zhang-zhong-wen-fen-ci/71-an-zhuang-ik-fen-ci-qi.html">
            
                    
                    7.2 安装 IK 分词器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="di-7-zhang-zhong-wen-fen-ci/72-ce-shi-shi-yong.html">
            
                <a href="di-7-zhang-zhong-wen-fen-ci/72-ce-shi-shi-yong.html">
            
                    
                    7.3 测试使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="di-8-zhang-guanyu-mapping.html">
            
                <a href="di-8-zhang-guanyu-mapping.html">
            
                    
                    第 8 章 关于 Mapping
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >第 3 章 ElasticSearch 安装</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x7B2C;-3-&#x7AE0;-elasticsearch-&#x5B89;&#x88C5;">&#x7B2C; 3 &#x7AE0; ElasticSearch &#x5B89;&#x88C5;</h1>
<h2 id="&#x6B65;&#x9AA4;-1-&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5305;">&#x6B65;&#x9AA4; 1: &#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5305;</h2>
<p>&#x6211;&#x4EEC;&#x4F7F;&#x7528; 6.3.1 &#x7248;&#x672C;</p>
<p><a href="https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-3-1" target="_blank">https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-3-1</a></p>
<h2 id="&#x6B65;&#x9AA4;-2-&#x89E3;&#x538B;">&#x6B65;&#x9AA4; 2: &#x89E3;&#x538B;</h2>
<pre class="language-"><code class="lang-bash"><span class="token function">tar</span> -zxvf elasticsearch-6.3.1.tar.gz -C /opt/module
</code></pre>
<h2 id="&#x6B65;&#x9AA4;-3-&#x4FEE;&#x6539;&#x914D;&#x7F6E;&#x6587;&#x4EF6;configelasticsearchyml">&#x6B65;&#x9AA4; 3: &#x4FEE;&#x6539;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<code>config/elasticsearch.yml</code></h2>
<p>&#x914D;&#x7F6E;&#x7684;&#x65F6;&#x5019;&#x9700;&#x8981;&#x6CE8;&#x610F;: &#x6BCF;&#x884C;&#x5FC5;&#x987B;&#x9876;&#x683C;, &#x4E0D;&#x80FD;&#x6709;&#x524D;&#x7F6E;&#x7A7A;&#x683C;. &quot;: &quot;&#x540E;&#x9762;&#x5FC5;&#x987B;&#x6709;&#x4E00;&#x4E2A;&#x7A7A;&#x683C;.</p>
<h3 id="1-&#x914D;&#x7F6E;&#x96C6;&#x7FA4;&#x540D;">1. &#x914D;&#x7F6E;&#x96C6;&#x7FA4;&#x540D;</h3>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562670363.png" alt=""></p>
<h3 id="2-&#x5F53;&#x524D;&#x8282;&#x70B9;&#x540D;-&#x6BCF;&#x4E2A;&#x8282;&#x70B9;&#x7684;&#x540D;&#x5B57;&#x4E0D;&#x80FD;&#x76F8;&#x540C;-&#x5F53;&#x5206;&#x53D1;&#x5230;&#x5176;&#x4ED6;&#x8282;&#x70B9;&#x7684;&#x65F6;&#x5019;-&#x9700;&#x8981;&#x6539;&#x6210;&#x4E0D;&#x540C;&#x7684;&#x540D;&#x5B57;">2. &#x5F53;&#x524D;&#x8282;&#x70B9;&#x540D;: &#x6BCF;&#x4E2A;&#x8282;&#x70B9;&#x7684;&#x540D;&#x5B57;&#x4E0D;&#x80FD;&#x76F8;&#x540C;, &#x5F53;&#x5206;&#x53D1;&#x5230;&#x5176;&#x4ED6;&#x8282;&#x70B9;&#x7684;&#x65F6;&#x5019;, &#x9700;&#x8981;&#x6539;&#x6210;&#x4E0D;&#x540C;&#x7684;&#x540D;&#x5B57;</h3>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562670482.png" alt=""></p>
<h3 id="3-&#x7ED9;&#x5F53;&#x524D;&#x8282;&#x70B9;&#x7ED1;&#x5B9A;-ip-&#x5730;&#x5740;-&#x7AEF;&#x53E3;&#x53F7;&#x4FDD;&#x6301;&#x9ED8;&#x8BA4;-9200-&#x5C31;&#x884C;">3. &#x7ED9;&#x5F53;&#x524D;&#x8282;&#x70B9;&#x7ED1;&#x5B9A; ip &#x5730;&#x5740;, &#x7AEF;&#x53E3;&#x53F7;&#x4FDD;&#x6301;&#x9ED8;&#x8BA4; 9200 &#x5C31;&#x884C;</h3>
<p> <img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562670567.png" alt=""></p>
<h3 id="4-&#x5173;&#x6389;-bootstrap-&#x81EA;&#x68C0;&#x7A0B;&#x5E8F;">4. &#x5173;&#x6389; bootstrap &#x81EA;&#x68C0;&#x7A0B;&#x5E8F;</h3>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562673411.png" alt=""></p>
<h3 id="5-&#x96C6;&#x7FA4;&#x4E2A;&#x8282;&#x70B9;ip&#x5730;&#x5740;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x57DF;&#x540D;&#xFF0C;&#x9700;&#x8981;&#x5404;&#x8282;&#x70B9;&#x80FD;&#x591F;&#x89E3;&#x6790;">5. &#x96C6;&#x7FA4;&#x4E2A;&#x8282;&#x70B9;IP&#x5730;&#x5740;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x57DF;&#x540D;&#xFF0C;&#x9700;&#x8981;&#x5404;&#x8282;&#x70B9;&#x80FD;&#x591F;&#x89E3;&#x6790;</h3>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562671381.png" alt=""></p>
<h2 id="&#x6B65;&#x9AA4;-4-&#x5206;&#x53D1;-elasticsearch">&#x6B65;&#x9AA4; 4: &#x5206;&#x53D1; ElasticSearch</h2>
<p>&#x6CE8;&#x610F;&#x4FEE;&#x6539;&#x6BCF;&#x4E2A;&#x8282;&#x70B9;&#x7684;&#x540D;
<img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562670482.png" alt=""></p>
<h2 id="&#x6B65;&#x9AA4;-5-&#x4FEE;&#x6539;-linux-&#x914D;&#x7F6E;">&#x6B65;&#x9AA4; 5: &#x4FEE;&#x6539; linux &#x914D;&#x7F6E;</h2>
<p>&#x9ED8;&#x8BA4; elasticsearch &#x662F;&#x5355;&#x673A;&#x8BBF;&#x95EE;&#x6A21;&#x5F0F;&#xFF0C;&#x5C31;&#x662F;&#x53EA;&#x80FD;&#x81EA;&#x5DF1;&#x8BBF;&#x95EE;&#x81EA;&#x5DF1;&#x3002;
&#x4F46;&#x662F;&#x6211;&#x4EEC;&#x4E4B;&#x540E;&#x4E00;&#x5B9A;&#x4F1A;&#x8BBE;&#x7F6E;&#x6210;&#x5141;&#x8BB8;&#x5E94;&#x7528;&#x670D;&#x52A1;&#x5668;&#x901A;&#x8FC7;&#x7F51;&#x7EDC;&#x65B9;&#x5F0F;&#x8BBF;&#x95EE;&#x3002;&#x8FD9;&#x65F6;&#xFF0C;elasticsearch &#x5C31;&#x4F1A;&#x56E0;&#x4E3A;&#x5ACC;&#x5F03;&#x5355;&#x673A;&#x7248;&#x7684;&#x4F4E;&#x7AEF;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x800C;&#x62A5;&#x9519;&#xFF0C;&#x751A;&#x81F3;&#x65E0;&#x6CD5;&#x542F;&#x52A8;&#x3002;
&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x5728;&#x8FD9;&#x91CC;&#x5C31;&#x8981;&#x628A;&#x670D;&#x52A1;&#x5668;&#x7684;&#x4E00;&#x4E9B;&#x9650;&#x5236;&#x6253;&#x5F00;&#xFF0C;&#x80FD;&#x652F;&#x6301;&#x66F4;&#x591A;&#x5E76;&#x53D1;</p>
<p>&#x6CE8;&#x610F;: &#x4FEE;&#x6539;&#x4EE5;&#x4E0B;&#x914D;&#x7F6E;&#x7684;&#x65F6;&#x5019;&#x9700;&#x8981;&#x5207;&#x6362;&#x5230; root &#x7528;&#x6237;, &#x6BCF;&#x4E2A;&#x8282;&#x70B9;&#x90FD;&#x8981;&#x4FEE;&#x6539;.</p>
<h3 id="&#x95EE;&#x9898;1&#xFF1A;-max-file-descriptors-4096-for-elasticsearch-process-likely-too-low-increase-to-at-least-65536-elasticsearch">&#x95EE;&#x9898;1&#xFF1A; max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536] elasticsearch</h3>
<p>&#x539F;&#x56E0;&#xFF1A;&#x7CFB;&#x7EDF;&#x5141;&#x8BB8; Elasticsearch &#x6253;&#x5F00;&#x7684;&#x6700;&#x5927;&#x6587;&#x4EF6;&#x6570;&#x9700;&#x8981;&#x4FEE;&#x6539;&#x6210; 65536
&#x89E3;&#x51B3;&#xFF1A;vim /etc/security/limits.conf
&#x6DFB;&#x52A0;&#x5185;&#x5BB9;&#xFF1A;</p>
<ul>
<li>soft nofile 65536</li>
<li>hard nofile 131072</li>
<li>soft nproc 2048</li>
<li>hard nproc 65536</li>
</ul>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x201C;*&#x201D; &#x4E0D;&#x8981;&#x7701;&#x7565;&#x6389;</p>
<h3 id="&#x95EE;&#x9898;2&#xFF1A;max-number-of-threads-1024-for-user-judy2-likely-too-low-increase-to-at-least-2048--&#xFF08;centos7x--&#x4E0D;&#x7528;&#x6539;&#xFF09;">&#x95EE;&#x9898;2&#xFF1A;max number of threads [1024] for user [judy2] likely too low, increase to at least [2048]  &#xFF08;CentOS7.x  &#x4E0D;&#x7528;&#x6539;&#xFF09;</h3>
<p>&#x539F;&#x56E0;&#xFF1A;&#x5141;&#x8BB8;&#x6700;&#x5927;&#x8FDB;&#x7A0B;&#x6570;&#x4FEE;&#x8BE5;&#x6210;4096
&#x89E3;&#x51B3;&#xFF1A;vim /etc/security/limits.d/90-nproc.conf<br>&#x4FEE;&#x6539;&#x5982;&#x4E0B;&#x5185;&#x5BB9;&#xFF1A;</p>
<ul>
<li>soft nproc 1024</li>
</ul>
<p>&#x4FEE;&#x6539;&#x4E3A;</p>
<ul>
<li>soft nproc 4096</li>
</ul>
<h3 id="&#x95EE;&#x9898;3&#xFF1A;max-virtual-memory-areas-vmmaxmapcount-65530-likely-too-low-increase-to-at-least-262144-&#xFF08;centos7x--&#x4E0D;&#x7528;&#x6539;&#xFF09;">&#x95EE;&#x9898;3&#xFF1A;max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144] &#xFF08;CentOS7.x  &#x4E0D;&#x7528;&#x6539;&#xFF09;</h3>
<p>&#x539F;&#x56E0;&#xFF1A;&#x4E00;&#x4E2A;&#x8FDB;&#x7A0B;&#x53EF;&#x4EE5;&#x62E5;&#x6709;&#x7684;&#x865A;&#x62DF;&#x5185;&#x5B58;&#x533A;&#x57DF;&#x7684;&#x6570;&#x91CF;&#x3002;
&#x89E3;&#x51B3;&#xFF1A; &#x5728;   <code>/etc/sysctl.conf</code> &#x6587;&#x4EF6;&#x6700;&#x540E;&#x6DFB;&#x52A0;&#x4E00;&#x884C;
vim /etc/sysctl.conf</p>
<p>vm.max_map_count=262144</p>
<p>&#x5373;&#x53EF;&#x6C38;&#x4E45;&#x4FEE;&#x6539;</p>
<h2 id="&#x6B65;&#x9AA4;-6-&#x6559;&#x5B66;&#x73AF;&#x5883;&#x542F;&#x52A8;&#x4F18;&#x5316;">&#x6B65;&#x9AA4; 6 &#x6559;&#x5B66;&#x73AF;&#x5883;&#x542F;&#x52A8;&#x4F18;&#x5316;</h2>
<p>ES&#x662F;&#x7528;&#x5728;Java&#x865A;&#x62DF;&#x673A;&#x4E2D;&#x8FD0;&#x884C;&#x7684;&#xFF0C;&#x865A;&#x62DF;&#x673A;&#x9ED8;&#x8BA4;&#x542F;&#x52A8;&#x5360;&#x7528;2G&#x5185;&#x5B58;&#x3002;&#x4F46;&#x662F;&#x5982;&#x679C;&#x662F;&#x88C5;&#x5728;PC&#x673A;&#x5B66;&#x4E60;&#x7528;&#xFF0C;&#x5B9E;&#x9645;&#x7528;&#x4E0D;&#x4E86;2&#x4E2A;G&#x3002;&#x6240;&#x4EE5;&#x53EF;&#x4EE5;&#x6539;&#x5C0F;&#x4E00;&#x70B9;&#x5185;&#x5B58;&#x3002;</p>
<pre class="language-"><code class="lang-bash">vim config/jvm.options
</code></pre>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562672308.png" alt=""></p>
<p>&#x6CE8;&#x610F;: &#x6CE8;&#x610F;&#x522B;&#x5FD8;&#x4E86;&#x5206;&#x53D1;&#x4FEE;&#x6539;&#x540E;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<code>jvm.options</code></p>
<h2 id="&#x6B65;&#x9AA4;-7-&#x542F;&#x52A8;-elasticsearch">&#x6B65;&#x9AA4; 7 &#x542F;&#x52A8; ElasticSearch</h2>
<p>&#x5206;&#x522B;&#x5728; 3 &#x53F0;&#x8BBE;&#x5907;&#x4E0A;&#x542F;&#x52A8; ElasticSearch</p>
<pre class="language-"><code>bin/elasticsearch &amp;
</code></pre><h2 id="&#x6B65;&#x9AA4;-8-&#x67E5;&#x770B;-elasticsearch-&#x662F;&#x5426;&#x542F;&#x52A8;&#x6210;&#x529F;">&#x6B65;&#x9AA4; 8 &#x67E5;&#x770B; ElasticSearch &#x662F;&#x5426;&#x542F;&#x52A8;&#x6210;&#x529F;</h2>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562673999.png" alt=""></p>
<h2 id="&#x6B65;&#x9AA4;-9-&#x6D4B;&#x8BD5;&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x8FDE;&#x63A5;&#x5230;-elasticsearch">&#x6B65;&#x9AA4; 9 &#x6D4B;&#x8BD5;&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x8FDE;&#x63A5;&#x5230; ElasticSearch</h2>
<pre class="language-"><code class="lang-bash"><span class="token function">curl</span> http://hadoop201:9200/_cat/nodes?v
</code></pre>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1562674179.png" alt=""></p>
<p>&#x6216;&#x8005;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x8F93;&#x5165;&#x5730;&#x5740;: <a href="http://hadoop1:9200/_cat/nodes?v" target="_blank">http://hadoop1:9200/_cat/nodes?v</a></p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; &#x5C1A;&#x7845;&#x8C37;&#x5927;&#x6570;&#x636E; 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification"><br>&#x8BE5;&#x6587;&#x4EF6;&#x6700;&#x540E;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2019-07-10 18:12:59
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="di-2-zhang-elasticsearch-ji-chu-zhi-shi/22-elasticsearch-te-dian.html" class="navigation navigation-prev " aria-label="Previous page: 2.2 ElasticSearch 特点">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="di-4-zhang-elasticsearch-jiao-hu-fang-shi.html" class="navigation navigation-next " aria-label="Next page: 第 4 章 Kibana 安装">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"第 3 章 ElasticSearch 安装","level":"1.3","depth":1,"next":{"title":"第 4 章 Kibana 安装","level":"1.4","depth":1,"path":"di-4-zhang-elasticsearch-jiao-hu-fang-shi.md","ref":"di-4-zhang-elasticsearch-jiao-hu-fang-shi.md","articles":[{"title":"4.1 ElasticSearch 交互方式","level":"1.4.1","depth":2,"path":"di-4-zhang-elasticsearch-jiao-hu-fang-shi/41-elasticsearch-jiao-hu-fang-shi.md","ref":"di-4-zhang-elasticsearch-jiao-hu-fang-shi/41-elasticsearch-jiao-hu-fang-shi.md","articles":[]},{"title":"4.2 安装 Kibana","level":"1.4.2","depth":2,"path":"di-4-zhang-elasticsearch-jiao-hu-fang-shi/42-an-zhuang-kibana.md","ref":"di-4-zhang-elasticsearch-jiao-hu-fang-shi/42-an-zhuang-kibana.md","articles":[]},{"title":"4.3 Kibana 功能简介","level":"1.4.3","depth":2,"path":"di-4-zhang-elasticsearch-jiao-hu-fang-shi/43-kibana-gong-neng-jian-jie.md","ref":"di-4-zhang-elasticsearch-jiao-hu-fang-shi/43-kibana-gong-neng-jian-jie.md","articles":[]}]},"previous":{"title":"2.2 ElasticSearch 特点","level":"1.2.3","depth":2,"path":"di-2-zhang-elasticsearch-ji-chu-zhi-shi/22-elasticsearch-te-dian.md","ref":"di-2-zhang-elasticsearch-ji-chu-zhi-shi/22-elasticsearch-te-dian.md","articles":[]},"dir":"ltr"},"config":{"plugins":["splitter","expandable-chapters-small","page-toc-button","-highlight","prism","prism-themes","tbfed-pagefooter","sitemap","change_girls","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy 尚硅谷大数据 2019","modify_label":"<br>该文件最后修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prismjs/themes/prism-solarizedlight.css"]},"disqus":{"shortName":"zhenchao125"},"livereload":{},"splitter":{},"change_girls":{"time":30,"urls":["http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/62171757.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/83394736.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3394270.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/65028582.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/20359261.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/37472401.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3355397.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/11075549.jpg-atguiguImg"]},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sitemap":{"hostname":"http://bigdataatguigu.applinzi.com/"},"page-toc-button":{"maxTocDepth":3,"minTocSize":2},"prism-themes":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":" 李振超","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"大数据 Azkaban 课堂笔记","language":"zh-hans","links":{"sidebar":{"联系我们":"http://www.atguigu.com/"}},"gitbook":"*","description":"课堂笔记,学生提前预习"},"file":{"path":"di-3-zhang-elasticsearch-an-zhuang.md","mtime":"2019-07-10T10:12:59.999Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-23T08:02:33.416Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-change_girls/girls.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

